Part Number Hot Search : 
IRFZ4 EG200 MX25U TA143 0PS48 ATF1508 MGFC5 APT30
Product Description
Full Text Search
 

To Download DS3231M Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 19-5312; Rev 0; 6/10
5ppm, I2C Real-Time Clock
General Description
The DS3231M is a low-cost, extremely accurate, I2C real-time clock (RTC). The device incorporates a battery input and maintains accurate timekeeping when main power to the device is interrupted. The integration of the microelectromechanical systems (MEMS) resonator enhances the long-term accuracy of the device and reduces the piece-part count in a manufacturing line. The DS3231M is available in the same footprint as the popular DS3231 RTC. The RTC maintains seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. Two programmable time-ofday alarms and a 1Hz output are provided. Address and data are transferred serially through an I2C bidirectional bus. A precision temperature-compensated voltage reference and comparator circuit monitors the status of VCC to detect power failures, to provide a reset output, and to automatically switch to the backup supply when necessary. Additionally, the RST pin is monitored as a pushbutton input for generating a microprocessor reset. See the Block Diagram for more details. Day) from -40NC to +85NC
S Battery Backup for Continuous Timekeeping S Low Power Consumption S Footprint and Functionally Compatible to DS3231 S Complete Clock Calendar Functionality Including
Features
S Timekeeping Accuracy Q5ppm (Q0.432 Second/
DS3231M
Seconds, Minutes, Hours, Day, Date, Month, and Year with Leap Year Compensation Up to Year 2100
S Two Time-of-Day Alarms S 1Hz and 32.768kHz Outputs S Reset Output and Pushbutton Input with
Debounce
S Fast (400kHz) I2C-Compatible Serial Bus S +2.3V to +5.5V Supply Voltage S Digital Temp Sensor with Q3NC Accuracy S -40NC to +85NC Temperature Range S 16-Pin SO (300 mils) Package S Underwriters Laboratories (UL) Recognized
Applications
Power Meters Industrial Applications
+3.3V
Typical Operating Circuit
+3.3V
Ordering Information
PART DS3231MZ+* DS3231M+ TEMP RANGE -40NC to +85NC -40NC to +85NC PIN-PACKAGE 8 SO 16 SO
INTERRUPTS CPU I/O PORT
SCL SDA 32KHZ INT/SQW RST DS3231M VBAT
+Denotes a lead(Pb)-free/RoHS-compliant package. *Future product--contact factory for availability.
Note: Some revisions of this device may incorporate deviations from published specifications known as errata. Multiple revisions of any device may be simultaneously available through various sales channels. For information about device errata, go to: www.maxim-ic.com/errata.
_______________________________________________________________ Maxim Integrated Products 1
For pricing, delivery, and ordering information, please contact Maxim Direct at 1-888-629-4642, or visit Maxim's website at www.maxim-ic.com.
5ppm, I2C Real-Time Clock DS3231M
ABSOLUTE MAXIMUM RATINGS
Voltage Range on Any Pin Relative to GND ........-0.3V to +6.0V Operating Temperature Range .......................... -40NC to +85NC Storage Temperature Range............................ -55NC to +125NC Lead Temperature (soldering, 10s) ................................+260NC Soldering Temperature (reflow) ......................................+260NC
Stresses beyond those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.
RECOMMENDED OPERATING CONDITIONS
(TA = -40NC to +85NC, unless otherwise noted.) (Note 1) PARAMETER Supply Voltage Logic 1 Logic 0 SYMBOL VCC VBAT VIH VIL CONDITIONS MIN 2.3 2.3 0.7 x VCC -0.3 TYP 3.3 3.0 MAX 5.5 5.5 VCC + 0.3 0.3 x VCC UNITS V V V
ELECTRICAL CHARACTERISTICS--FREQUENCY AND TIMEKEEPING
(VCC or VBAT = +3.3V, TA = -40NC to +85NC, unless otherwise noted. Typical values are at VCC = +3.3V, VBAT = +3.0V, and TA = +25NC, unless otherwise noted.) PARAMETER 1Hz Frequency Tolerance 1Hz Frequency Stability vs. VCC Voltage Timekeeping Accuracy 32kHz Frequency Tolerance SYMBOL Df/fOUT Df/V tKA Df/fOUT CONDITIONS Measured over R 10s interval Q1 Q0.432 Q2.5 MIN TYP MAX Q5 UNITS ppm ppm/V Seconds/ Day %
DC ELECTRICAL CHARACTERISTICS--GENERAL
(VCC = +2.3V to +5.5V, TA = -40NC to +85NC, unless otherwise noted. Typical values are at VCC = +3.3V, VBAT = +3.0V, and TA = +25NC, unless otherwise noted.) PARAMETER Active Supply Current (I2C Active: Includes Temperature Conversion Current) Standby Supply Current (I2C Inactive: Includes Temperature Conversion Current) Temperature Conversion Current (I2C Inactive) SYMBOL ICCA VCC = +3.63V VCC = VCCMAX VCC = +3.63V VCC = VCCMAX VCC = +3.63V VCC = VCCMAX CONDITIONS MIN TYP MAX 200 300 130 200 575 650 UNITS A
ICCS
A
ICCSCONV
A
2
5ppm, I2C Real-Time Clock
DC ELECTRICAL CHARACTERISTICS--GENERAL (continued)
(VCC = +2.3V to +5.5V, TA = -40NC to +85NC, unless otherwise noted. Typical values are at VCC = +3.3V, VBAT = +3.0V, and TA = +25NC, unless otherwise noted.) PARAMETER Power-Fail Voltage Logic 0 Output (32KHZ, INT/SQW, SDA) Logic 0 Output (RST) Output Leakage (32KHZ, INT/SQW, SDA) Input Leakage (SCL) RST I/O Leakage VBAT Leakage Temperature Accuracy Temperature Conversion Time Pushbutton Debounce Reset Active Time Oscillator Stop Flag (OSF) Delay SYMBOL VPF VOL VOL ILO ILI IOL IBATLKG TEMPACC tCONV PBDB tRST tOSF (Note 2) VCC or VBAT = +3.3V 10 250 250 125 200 IOL = 3mA IOL = 1mA -0.1 -0.1 -200 25 CONDITIONS MIN 2.45 TYP 2.575 MAX 2.70 0.4 0.4 +0.1 +0.1 +10 100 Q3 UNITS V V V A A A nA NC ms ms ms ms
DS3231M
DC ELECTRICAL CHARACTERISTICS--VBAT CURRENT CONSUMPTION
PARAMETER Active Battery Current (I2C Active) (Note 3) Timekeeping Battery Current (I2C Inactive) (Note 3) Temperature Conversion Current (I2C Inactive) Data Retention Current (Oscillator Stopped and I2C Inactive) SYMBOL IBATA IBATT IBATTC CONDITIONS VBAT = +3.63V VBAT = VBATMAX VBAT = +3.63V, EN32KHZ = 0 VBAT = VBATMAX, EN32KHZ = 0 VBAT = +3.63V VBAT = VBATMAX TA = +25NC 2 2 MIN
(VCC = 0V, VBAT = +2.3V to +5.5V, TA = -40NC to +85NC, unless otherwise noted. Typical values are at VCC = 0V, VBAT = +3.0V, and TA = +25NC, unless otherwise noted.) TYP MAX 70 150 3.0 3.5 575 650 100 UNITS A A A
IBATDR
nA
AC ELECTRICAL CHARACTERISTICS--POWER SWITCH
(TA = -40NC to +85NC, unless otherwise noted.) (Figure 2) PARAMETER VCC Fall Time, VPFMAX to VPFMIN VCC Rise Time, VPFMIN to VPFMAX Recovery at Power-Up SYMBOL tVCCF tVCCR tREC (Note 4) CONDITIONS MIN 300 0 250 300 TYP MAX UNITS Fs Fs ms
3
5ppm, I2C Real-Time Clock DS3231M
AC ELECTRICAL CHARACTERISTICS--I2C INTERFACE
(VCC or VBAT = +2.3V to +5.5V, TA = -40NC to +85NC, unless otherwise noted. Typical values are at VCC = +3.3V, VBAT = +3.0V, and TA = +25NC, unless otherwise noted.) (Note 5, Figure 1) PARAMETER SCL Clock Frequency Bus Free Time Between STOP and START Conditions Hold Time (Repeated) START Condition Low Period of SCL High Period of SCL Data Hold Time Data Set-Up Time START Set-Up Time SDA and SCL Rise Time SDA and SCL Fall Time STOP Set-Up Time SDA, SCL Input Capacitance Note Note Note Note 1: 2: 3: 4: SYMBOL fSCL tBUF tHD:STA tLOW tHIGH tHD:DAT tSU:DAT tSU:STA tR tF tSU:STO CBIN (Note 6) (Note 6) CONDITIONS MIN 0 1.3 0.6 1.3 0.6 0 100 0.6 20 + 0.1CB 20 + 0.1CB 0.6 10 300 300 0.9 TYP MAX 400 UNITS kHz Fs Fs Fs Fs Fs ns Fs ns ns Fs pF
All voltages are referenced to ground. The parameter tOSF is the period of time the oscillator must be stopped for the OSF flag to be set. Includes the temperature conversion current (averaged). This delay applies only if the oscillator is enabled. If the EOSC bit is 1, tREC is bypassed and RST immediately goes high. The state of RST does not affect the I2C interface or RTC functions. Note 5: Interface timing shown is for fast-mode (400kHz) operation. This device is also backward-compatible with standard mode I2C timing. Note 6: CB: Total capacitance of one bus line in picofarads.
4
5ppm, I2C Real-Time Clock
Timing Diagrams
DS3231M
SDA tBUF tLOW SCL tHIGH tHD:DAT STOP START tSU:DAT REPEATED START tF tHD:STA tSP
tHD:STA
tR
tSU:STA
tSU:STO
NOTE: TIMING IS REFERENCED TO VILMAX AND VIHMIN.
Figure 1. I2C Timing
tVCCF
tVCCR
VPFMAX VPFMIN VCC
tREC
RST
Figure 2. Power Switch Timing
RST
PBDB
tRST
Figure 3. Pushbutton Reset Timing
5
5ppm, I2C Real-Time Clock DS3231M
Typical Operating Characteristics
(TA = +25C, unless otherwise noted.)
POWER-SUPPLY CURRENT vs. POWER-SUPPLY VOLTAGE
DS3231M toc01
BATTERY-SUPPLY CURRENT vs. BATTERY-SUPPLY VOLTAGE
VCC = 0V, EN32KHZ = 1, BBSQW = 0 +85C
3.0 2.5 2.0 1.5 1.0
DS3231M toc02
150 140 130 SUPPLY CURRENT (A) 120 110 100 90 80 70 60 50 2
VBAT = 2.3V, EN32KHZ = 1, IOUT = 0mA +85C
4.0 3.5 SUPPLY CURRENT (A)
+25C -40C INCREASE BELOW VPF DUE TO INTERNAL PULLUP RESISTOR ON RST
3 4 SUPPLY VOLTAGE (V) 5 6
+25C
-40C
2 3 4 SUPPLY VOLTAGE (V) 5 6
INT/SQW OUTPUT VOLTAGE vs. OUTPUT CURRENT
DS3231M toc03
RST OUTPUT VOLTAGE vs. OUTPUT CURRENT
VCC = 2.45V, VBAT = 3.0V, TA = +25C
DS3231M toc04
0.5 0.4 OUTPUT VOLTAGE (V) 0.3 0.2 0.1 0 0
VCC = 2.3V, VBAT = 0V, TA = +25C
0.5 0.4 OUTPUT VOLTAGE (V) 0.3 0.2 0.1 0
2
4
6
8
10
0
1
2
3
4
5
OUTPUT CURRENT (mA)
OUTPUT CURRENT (mA)
RST OUTPUT VOLTAGE vs. POWER SUPPLY VOLTAGE
DS3231M toc05
FREQUENCY ERROR vs. TEMPERATURE
8 FREQUENCY ERROR (ppm) 6 4 2 0 -2 -4 -6 -8 -10
5 OUTPUT VOLTAGE (V) 4 3
VBAT = 3.0V, TA = +25C
VCC = 3.3V
TRACKS WITH VCC
2 1 0 0 2 4 6 SUPPLY VOLTAGE (V)
-50
0
50
100
TEMPERATURE (C)
6
DS3231M toc06
6
10
LIMITS
5ppm, I2C Real-Time Clock
Pin Configuration
TOP VIEW + TOP VIEW
32KHZ VCC INT/SQW RST 1 2 3 4
DS3231M
32KHZ 1 VCC 2 INT/SQW 3 RST 4 N.C. 5 N.C. 6 N.C. 7 N.C. 8
16 SCL 15 SDA DS3231M 14 VBAT 13 GND 12 N.C. 11 N.C. 10 N.C. 9 N.C.
+
DS3231M
8 SCL 7 6 5 SDA VBAT GND
SO
SO
Pin Description
PIN 8 SO 1 16 SO 1 NAME FUNCTION 32.768kHz Output (50% Duty Cycle). This open-drain pin requires an external pullup resistor. When enabled with the EN32KHZ bit in the Status register (0Fh), this output operates on either power supply. This pin can be left open circuit if not used. DC Power Pin for Primary Power Supply. This pin should be decoupled using a 0.1FF to 1.0FF capacitor. Connect to ground if not used. Active-Low Interrupt or 1Hz Square-Wave Output. This open-drain pin requires an external pullup resistor connected to a supply at 5.5V or less. It can be left open if not used. This multifunction pin is determined by the state of the INTCN bit in the Control register (0Eh). When INTCN is set to logic 0, this pin outputs a 1Hz square wave. When INTCN is set to logic 1, a match between the timekeeping registers and either of the alarm registers activates the INT/SQW pin (if the alarm is enabled). Because the INTCN bit is set to logic 1 when power is first applied, the pin defaults to an interrupt output with alarms disabled. Active-Low Reset. This pin is an open-drain input/output. It indicates the status of VCC relative to the VPF specification. As VCC falls below VPF, the RST pin is driven low. When VCC exceeds VPF, for tRST, the RST pin is pulled high by the internal pullup resistor. The active-low, open-drain output is combined with a debounced pushbutton input function. This pin can be activated by a pushbutton reset request. It has an internal 50kI (RPU) nominal value pullup resistor to VCC. No external pullup resistors should be connected. If the oscillator is disabled, tREC is bypassed and RST immediately goes high. No Connection. These pins must be connected to ground. Ground Backup Power-Supply Input. When using the device with the VBAT input as the primary power source, this pin should be decoupled using a 0.1FF to 1.0FF low-leakage capacitor. When using the device with the VBAT input as the backup power source, the capacitor is not required. If VBAT is not used, connect to ground. The device is UL recognized to ensure against reverse charging when used with a primary lithium battery. Go to www.maxim-ic.com/qa/info/ul for more information.
32KHZ
2
2
VCC
3
3
INT/ SQW
4
4
RST
-- 5
5-12 13
N.C. GND
6
14
VBAT
7
5ppm, I2C Real-Time Clock DS3231M
Pin Description (continued)
PIN 8 SO 7 16 SO 15 NAME SDA FUNCTION Serial-Data Input/Output. This pin is the data input/output for the I2C serial interface. This open-drain pin requires an external pullup resistor. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC. Serial-Clock Input. This pin is the clock input for the I2C serial interface and is used to synchronize data movement on the serial interface. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC.
8
16
SCL
Block Diagram
32KHZ DIVIDER
DS3231M
N
INT/SQW VBAT VCC RPU RST POWER CONTROL TIME-BASE RESONATOR DIGITAL ADJUSTMENT TEMP SENSOR FACTORY TRIM I2C INTERFACE CONTROL AND STATUS REGISTERS CLOCK/CALENDAR WITH ALARM 1Hz INTERRUPT OR 1Hz SELECT
N
N
GND SDA SCL
Detailed Description
The DS3231M is a serial real-time clock (RTC) driven by an internal, temperature-compensated, microelectromechanical systems (MEMS) resonator. The oscillator provides a stable and accurate reference clock and maintains the RTC to within Q0.432 seconds-per-day accuracy from -40NC to +85NC. The RTC is a low-power clock/ calendar with two programmable time-of-day alarms. INT/ SQW provides either an interrupt signal due to alarm conditions or a 1Hz square wave. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than
31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. The internal registers are accessible though an I2C bus interface. A temperature-compensated voltage reference and comparator circuit monitors the level of VCC to detect power failures and to automatically switch to the backup supply when necessary. The RST pin provides an external pushbutton function and acts as an indicator of a power-fail event.
Operation
The Block Diagram shows the device's main elements. Each of the major blocks is described separately in the following sections.
8
5ppm, I2C Real-Time Clock
+3.3V
VCC
VBAT
Figure 4. Single Supply (VCC Only)
The temperature sensor, oscillator, and digital adjustment controller logic form the highly accurate time base. The controller reads the output of the on-board temperature sensor and adjusts the final 1Hz output to maintain the required accuracy. The device is trimmed at the factory to maintain a tight accuracy over the operating temperature range. When the device is powered by VCC, the adjustment occurs once a second. When the device is powered by VBAT, the adjustment occurs once every 10s to conserve power. Adjusting the 1Hz time base less often does not affect the device's long-term timekeeping accuracy. The device also contains an Aging Offset register that allows a constant offset (positive or negative) to be added to the factory-trimmed adjustment value. The DS3231M can be configured to operate on a single power supply (using either VCC or VBAT) or in a dualsupply configuration, which provides a backup supply source to keep the timekeeping circuits alive during absence of primary system power. Figure 4 illustrates a single-supply configuration using VCC only, with the VBAT input grounded. When VCC < VPF, the RST output is asserted (active low). Temperature conversions are executed once per second. Figure 5 illustrates a single-supply configuration using VBAT only, with the VCC input grounded. The RST output is disabled and is held at ground through the connection of the internal pullup resistor. Temperature conversions are executed once every 10s.
High-Accuracy Time Base
DS3231M
VCC
Power-Supply Configurations
VBAT
Figure 5. Single Supply (VBAT Only)
+3.3V
VCC
VBAT
Figure 6. Dual Power Supply
Figure 6 illustrates a dual-supply configuration, using the VCC supply for normal system operation and the VBAT supply for backup power. In this configuration, the power-selection function is provided by a temperaturecompensated voltage reference and a comparator circuit that monitors the VCC level. When VCC is greater than VPF, the device is powered by VCC. When VCC is less than VPF but greater than VBAT, the device is powered
I/O ACTIVE ICCA IBATA ICCA VCC > VBAT VCC < VBAT ICCA IBATA VCC > VBAT VCC < VBAT I/O INACTIVE ICCS IBATT IBATDR ICCS ICCS IBATT
Table 1. Power Control
CONFIGURATION VCC Only (Figure 4) VBAT Only (Figure 5) Dual Supply (Figure 6) CONDITION VCC > VPF VCC < VPF EOSC = 0 EOSC = 1 VCC > VPF VCC < VPF RST Inactive (High) Active (Low) Disabled (Low) Inactive (High) Active (Low)
9
5ppm, I2C Real-Time Clock DS3231M
by VCC. If VCC is less than VPF and is less than VBAT, the device is powered by VBAT (see Table 1). When VCC < VPF, the RST output is asserted (active low). When VCC is the presently selected power source, temperature conversions are executed once per second. When VBAT is the presently selected power source, temperature conversions are executed once every 10s. To preserve the battery, the first time VBAT is applied to the device the oscillator does not start up until VCC exceeds VPF or until a valid I2C address is written to the device. Typical oscillator startup time is less than 1s. Approximately 2s after VCC is applied, or a valid I2C address is written, the device makes a temperature measurement and applies the calculated correction to the oscillator. Once the oscillator is running, it continues to run as long as a valid power source is available (VCC or VBAT), and the device continues to measure the temperature and correct the oscillator frequency. On the first application of VCC power, or (if VBAT powered) when a valid I2C address is written to the device, the time and date registers are reset to 01/01/00 01 00:00:00 (MM/DD/ YY DOW HH:MM:SS). VBAT Operation There are several modes of operation that affect the amount of VBAT current that is drawn. While the device is powered by VBAT and the serial interface is active, the active battery current IBATA is drawn. When the serial interface is inactive, the timekeeping current IBATT (which includes the averaged temperature-conversion current IBATTC) is used. The temperature-conversion current IBATTC is specified since the system must be able to support the periodic higher current pulse and still maintain a valid voltage level. The data-retention current IBATDR is the current drawn by the device when the oscillator is stopped (EOSC = 1). This mode can be used to minimize battery requirements for periods when maintaining time and date information is not necessary, e.g., while the end system is waiting to be shipped to a customer. The device provides for a pushbutton switch to be connected to the RST input/output pin. When the device is not in a reset cycle, it continuously monitors RST for a low-going edge. If an edge transition is detected, the device debounces the switch by pulling RST low. After the internal timer has expired (PBDB), the device continues to monitor the RST line. If the line is still low, the device continuously monitors the line looking for a rising edge. Upon detecting release, the device forces RST low and holds it low for tRST. RST is also used to indicate a power-fail condition. When VCC is lower than VPF, an internal power-fail signal is generated, which forces RST low. When VCC returns to a level above VPF, RST is held low for approximately 250ms (tREC) to allow the power supply to stabilize. If the oscillator is not running when VCC is applied, tREC is bypassed and RST immediately goes high. Assertion of the RST output, whether by pushbutton or power-fail detection, does not affect the device's internal operation. RST output operation and pushbutton monitoring are only available if VCC power is available. With the 1Hz source from the temperature-compensated oscillator, the RTC provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or the 12-hour format with an AM/PM indicator. The clock provides two programmable time-of-day alarms. INT/SQW can be enabled to generate either an interrupt due to an alarm condition or a 1Hz square wave. This selection is controlled by the INTCN bit in the Control register. The I2C interface is accessible whenever either VCC or VBAT is at a valid level. If a microcontroller connected to the device resets because of a loss of VCC or other event, it is possible that the microcontroller and device's I2C communications could become unsynchronized, e.g., the microcontroller resets while reading data from the device. When the microcontroller resets, the device's I2C interface can be placed into a known state by toggling SCL until SDA is observed to be at a high level. At that point the microcontroller should pull SDA low while SCL is high, generating a START condition. Table 2 shows the address map for the device's timekeeping registers. During a multibyte access, when the address pointer reaches the end of the register space (12h), it wraps around to location 00h. On an I2C START or address pointer incrementing to location 00h, the current time is transferred to a second set of registers. The time information is read from these secondary registers, while the clock can continue to run. This eliminates the need to reread the registers in case the main registers update during a read.
Real-Time Clock (RTC)
I2C Interface
Address Map
Pushbutton Reset Function
10
5ppm, I2C Real-Time Clock
Table 2. Timekeeping Registers
ADDRESS 00h 01h 02h 03h 04h 05h 06h 07h 08h A1M1 A1M2 BIT 7 MSB 0 0 0 0 0 Century 12/24 0 0 0 10 Year 10 Seconds 10 Minutes AM/PM 09h A1M3 12/24 20 Hours 10 Hours 0 BIT 6 BIT 5 10 Seconds 10 Minutes AM/PM 20 Hours 0 10 Date 10 Month 10 Hours 0 0 Date Month Year Seconds Minutes BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 LSB FUNCTION Seconds Minutes Hours Day Day Date Month/Century Year Alarm 1 Seconds Alarm 1 Minutes Alarm 1 Hours Alarm 1 Day Alarm 1 Date Alarm 2 Minutes Alarm 2 Hours Alarm 2 Day Alarm 2 Date A2IE A2F DATA DATA 0 A1IE A1F DATA DATA 0 Control Status Aging Offset Temperature MSB Temperature LSB RANGE 00-59 00-59 1-12 + AM/PM 00-23 1-7 01-31 01-12 + Century 00-99 00-59 00-59 1-12 + AM/PM 00-23 1-7 1-31 00-59 1-12 + AM/PM 00-23 1-7 1-31 -- -- -- -- --
DS3231M
Seconds Minutes Hour
Hour Day Date Minutes
0Ah 0Bh
A1M4 A2M2
DY/DT
10 Date 10 Minutes AM/PM 10 Hours
0Ch
A2M3
12/24
20 Hours
Hour Day Date
0Dh 0Eh 0Fh 10h 11h 12h
A2M4 EOSC OSF SIGN SIGN DATA
DY/DT BBSQW 0 DATA DATA DATA
10 Date CONV 0 DATA DATA 0 NA 0 DATA DATA 0 NA EN32KHZ DATA DATA 0
INTCN BSY DATA DATA 0
Note: Unless otherwise specified, the registers' state is not defined when power is first applied.
The time and calendar information is obtained by reading the appropriate register bytes. Table 2 shows the RTC registers. The time and calendar data are set or initialized by writing the appropriate register bytes. The contents of the time and calendar registers are in the binary-coded decimal (BCD) format. The device can
Clock and Calendar
be run in either 12-hour or 24-hour mode. Bit 6 of the Hours register is defined as the 12-hour or 24-hour mode select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5 is the AM/PM bit with logic-high being PM. In the 24-hour mode, bit 5 is the 20-hour bit (20-23 hours). The century bit (bit 7 of the Month register) is toggled when the Years register overflows from 99
11
5ppm, I2C Real-Time Clock
to 00. The day-of-week register increments at midnight. Values that correspond to the day of week are userdefined but must be sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on). Illogical time and date entries result in undefined operation. When reading or writing the time and date registers, secondary buffers are used to prevent errors when the internal registers update. When reading the time and date registers, the secondary buffers are synchronized to the internal registers on any I2C START and when the register pointer rolls over to zero. The time information is read from these secondary registers, while the clock continues to run. This eliminates the need to reread the registers in case the main registers update during a read. The countdown chain is reset whenever the seconds register is written. Write transfers occur on the acknowledge from the device. Once the countdown chain is reset, to avoid rollover issues the remaining time and date registers must be written within 1s. The device contains two time-of-day/date alarms. Alarm 1 can be set by writing to registers 07h-0Ah. Alarm 2 can be set by writing to registers 0Bh-0Dh. See Table 2. The alarms can be programmed (by the alarm enable and INTCN bits in the Control register) to activate the INT/SQW output on an alarm match condition. Bit 7 of each of the time-of-day/date alarm registers are mask bits (Table 2). When all the mask bits for each alarm are logic 0, an alarm only occurs when the values in the timekeeping registers match the corresponding values stored in the time-of-day/date alarm registers. The alarms can also be programmed to repeat every second, minute, hour, day, or date. Table 3 shows the possible settings. Configurations not listed in the table result in illogical operation. The DY/DT bits (bit 6 of the alarm day/date registers) control whether the alarm value stored in bits 0-5 of that register reflects the day of the week or the date of the month. If DY/DT is written to logic 0, the alarm is the result of a match with date of the month. If DY/DT is written to logic 1, the alarm is the result of a match with day of the week. When the RTC register values match alarm register settings, the corresponding alarm flag A1F or A2F bit is set to logic 1. If the corresponding alarm interrupt enable A1IE or A2IE bit is also set to logic 1, the alarm condition activates the INT/SQW signal if the INTCN bit is set to logic 1. The match is tested on the once-per-second update of the time and date registers.
DS3231M
Alarms
Table 3. Alarm Mask Bits
DY/DT X X X X 0 1 ALARM 1 REGISTER MASK BITS (BIT 7) A1M4 1 1 1 1 0 0 A1M3 1 1 1 0 0 0 A1M2 1 1 0 0 0 0 A1M1 1 0 0 0 0 0 Alarm once a second Alarm when seconds match Alarm when minutes and seconds match Alarm when hours, minutes, and seconds match Alarm when date, hours, minutes, and seconds match Alarm when day, hours, minutes, and seconds match ALARM RATE
DY/DT X X X 0 1
ALARM 2 REGISTER MASK BITS (BIT 7) A2M4 1 1 1 0 0 A2M3 1 1 0 0 0 A2M2 1 0 0 0 0
ALARM RATE Alarm once per minute (00 seconds of every minute) Alarm when minutes match Alarm when hours and minutes match Alarm when date, hours, and minutes match Alarm when day, hours, and minutes match
12
5ppm, I2C Real-Time Clock
Control Register (0Eh)
BIT 7 ESOC 0 BIT 6 BBSQW 0 BIT 5 CONV 0 BIT 4 NA 1 BIT 3 NA 1 BIT 2 INTCN 1 BIT 1 A2IE 0 BIT 0 A1IE 0
DS3231M
BIT 7
ESOC: Enable oscillator. When set to logic 0, the oscillator is started. When set to logic 1, the oscillator is stopped when the device switches to VBAT. This bit is clear (logic 0) when power is first applied. When the device is powered by VCC, the oscillator is always on regardless of the status of the EOSC bit. When the oscillator is disabled, all register data is static. BBSQW: Battery-backed square-wave enable. When set to logic 1 with INTCN = 0 and VCC < VPF, this bit enables the 1Hz square wave. When BBSQW is logic 0, INT/SQW goes high impedance when VCC falls below VPF. This bit is disabled (logic 0) when power is first applied. CONV: Convert temperature. Setting this bit to 1 forces the temperature sensor to convert the temperature into digital code and execute the temperature compensate algorithm to update the oscillator's accuracy. The device cannot be forced to execute the temperature-compensate algorithm faster than once per second. A user-initiated temperature conversion does not affect the internal update cycle. The CONV bit remains at a 1 from the time it is written until the temperature conversion is completed, at which time both CONV and BSY go to 0. The CONV bit should be used when monitoring the status of a user-initiated conversion. See Figure 7 for more details. NA: Not applicable. These bits have no affect on the device and can be set to either 0 or 1. INTCN: Interrupt control. This bit controls the INT/SQW output signal. When the INTCN bit is set to logic 0, a 1Hz square wave is output on INT/SQW. When the INTCN bit is set to logic 1, a match between the timekeeping registers and either of the alarm registers activates the INT/SQW output (if the alarm is also enabled). The corresponding alarm flag is always set regardless of the state of the INTCN bit. The INTCN bit is set to a logic 1 when power is first applied. A2IE: Alarm 2 interrupt enable. When set to logic 1, this bit permits the alarm 2 flag (A2F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A2IE bit is set to logic 0 or INTCN is set to logic 0, the A2F bit does not initiate an interrupt signal. The A2IE bit is disabled (logic 0) when power is first applied. A1IE: Alarm 1 interrupt enable. When set to logic 1, this bit permits the alarm 1 flag (A1F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A1IE bit is set to logic 0 or INTCN is set to logic 0, the A1F bit does not initiate an interrupt signal. The A1IE bit is disabled (logic 0) when power is first applied.
BIT 6
BIT 5
BITS 4:3
BIT 2
BIT 1
BIT 0
13
5ppm, I2C Real-Time Clock DS3231M
VCC POWERED
INTERNAL 1Hz CLOCK
BSY
CONV
THE USER SETS THE CONV BIT
THE DEVICE CLEARS THE CONV BIT AFTER THE TEMPERATURE CONVERSION HAS COMPLETED
BSY IS HIGH DURING THE TEMPERATURE CONVERSION
VBAT POWERED 10 SECONDS
INTERNAL 1Hz CLOCK
BSY
CONV
THE USER SETS THE CONV BIT
THE DEVICE CLEARS THE CONV BIT AFTER THE TEMPERATURE CONVERSION HAS COMPLETED
Figure 7. CONV Control Bit and BSY Status Bit Operation
14
5ppm, I2C Real-Time Clock
Status Register (0Fh)
BIT 7 OSF 1 BIT 6 0 0 BIT 5 0 0 BIT 4 0 0 BIT 3 EN32KHZ 1 BIT 2 BSY X BIT 1 A2F X BIT 0 A1F X
DS3231M
OSF: Oscillator stop flag. A logic 1 in this bit indicates that the oscillator either is stopped or was stopped for some period and could be used to judge the validity of the timekeeping data. This bit is set to logic 1 any time that the oscillator stops. This bit remains at logic 1 until written to logic 0. The following are examples of BIT 7 conditions that can cause the OSF bit to be set: 1) The first time power is applied. 2) The voltages present on both VCC and VBAT are insufficient to support the oscillator. 3) The EOSC bit is turned off in battery-backed mode. 4) External influences on the oscillator (i.e., noise, leakage, etc.). Unused (0). These bits have no meaning and are fixed at 0 when read. EN32KHZ: Enabled 32.768kHz output. This bit enables and disables the 32KHZ output. When set to a logic 0, the 32KHZ output is high impedance. On initial power-up, this bit is set to a logic 1 and the 32KHZ output is enabled and produces a 32.768kHz square wave if the oscillator is enabled. BSY: Busy. This bit indicates the device is busy executing temperature conversion function. It goes to logic 1 when the conversion signal to the temperature sensor is asserted, and then it is cleared when the device has completed the temperature conversion. See the Block Diagram for more details. A2F: Alarm 2 flag. A logic 1 in the alarm 2 flag bit indicates that the time matched the alarm 2 registers. If the A2IE bit is logic 1 and the INTCN bit is set to logic 1, INT/SQW is also asserted. A2F is cleared when written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged. A1F: Alarm 1 flag. A logic 1 in the alarm 1 flag bit indicates that the time matched the alarm 1 registers. If the A1IE bit is logic 1 and the INTCN bit is set to logic 1, INT/SQW is also asserted. A1F is cleared when written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged.
BITS 6:4 BIT 3
BIT 2
BIT 1
BIT 0
Aging Offset Register (10h)
BIT 7 SIGN 0 BIT 6 DATA 0 BIT 5 DATA 0 BIT 4 DATA 0 BIT 3 DATA 0 BIT 2 DATA 0 BIT 1 DATA 0 BIT 0 DATA 0
The Aging Offset register takes a user-provided value to add to or subtract from the factory-trimmed value that adjusts the accuracy of the time base. Use of the Aging Offset register is not needed to achieve the accuracy as defined in the Electrical Characteristics tables. The Aging Offset code is encoded in two's complement, with bit 7 representing the SIGN bit. One LSB typically represents a 0.12ppm change in frequency. The change in ppm per LSB is the same over the operating temperature range. Positive offsets slow the time base and negative offsets quicken the time base.
15
5ppm, I2C Real-Time Clock DS3231M
Temperature Registers (11h-12h)
Temperature Register (Upper Byte = 11h) BIT 7 SIGN 0 BIT 6 DATA 0 BIT 5 DATA 0 BIT 4 DATA 0 BIT 3 DATA 0 BIT 2 DATA 0 BIT 1 DATA 0 BIT 0 DATA 0
Temperature Register (Lower Byte = 12h) BIT 7 DATA 0 BIT 6 DATA 0 BIT 5 0 0 BIT 4 0 0 BIT 3 0 0 BIT 2 0 0 BIT 1 0 0 BIT 0 0 0
Temperature is represented as a 10-bit code with a resolution of 0.25C and is accessible at location 11h and 12h. The temperature is encoded in two's complement format. The upper 8 bits, the integer portion, are at location 11h and the lower 2 bits, the fractional portion, are at location 12h. For example, 00011001 01b = +25.25C. Upon power reset, the registers are set to a default temperature of 0C and the controller starts a temperature conversion. The temperature is read upon initial application of VCC or I2C access on VBAT and once every second afterwards with VCC power or once every 10s with VBAT power. The Temperature registers are also updated after each user-initiated conversion and are read only.
I2C Serial Port Operation
The device's slave address byte is D0h. The first byte sent to the device includes the device identifier, device address, and the R/W bit (Figure 8). The device address sent by the I2C master must match the address assigned to the device. The following terminology is commonly used to describe I2C data transfers.
I2C Slave Address
Bus Idle or Not Busy: Time between STOP and START conditions when both SDA and SCL are inactive and in their logic-high states. When the bus is idle, it often initiates a low-power mode for slave devices. START Condition: A START condition is generated by the master to initiate a new data transfer with a slave. Transitioning SDA from high to low while SCL remains high generates a START condition. See Figure 1 for applicable timing. STOP Condition: A STOP condition is generated by the master to end a data transfer with a slave. Transitioning SDA from low to high while SCL remains high generates a STOP condition. See Figure 1 for applicable timing. Repeated START Condition: The master can use a repeated START condition at the end of one data transfer to indicate that it immediately initiates a new data transfer following the current one. Repeated STARTs are commonly used during read operations to identify a specific memory address to begin a data transfer. A repeated START condition is issued identically to a normal START condition. See Figure 1 for applicable timing.
I2C Definitions
Master Device: The master device controls the slave devices on the bus. The master device generates SCL clock pulses and START and STOP conditions. Slave Devices: Slave devices send and receive data at the master's request.
MSB 1 1 0 1 0 0 0 LSB R/W READ/ WRITE BIT
DEVICE IDENTIFIER
Figure 8. I2C Slave Address Byte
16
5ppm, I2C Real-Time Clock
Bit Write: Transitions of SDA must occur during the low state of SCL. The data on SDA must remain valid and unchanged during the entire high pulse of SCL plus the setup and hold time requirements (see Figure 1). Data is shifted into the device during the rising edge of the SCL. Bit Read: At the end of a write operation, the master must release the SDA bus line for the proper amount of setup time (see Figure 1) before the next rising edge of SCL during a bit read. The device shifts out each bit of data on SDA at the falling edge of the previous SCL pulse and the data bit is valid at the rising edge of the current SCL pulse. Remember that the master generates all SCL clock pulses including when it is reading bits from the slave. Acknowledge (ACK and NACK): An acknowledge (ACK) or not acknowledge (NACK) is always the ninth bit transmitted during a byte transfer. The device receiving data (the master during a read or the slave during a write operation) performs an ACK by transmitting a 0 during the ninth bit. A device performs a NACK by transmitting a 1 during the ninth bit. Timing for the ACK and NACK is identical to all other bit writes. An ACK is the acknowledgment that the device is properly receiving data. A NACK is used to terminate a read sequence or as an indication that the device is not receiving data. Byte Write: A byte write consists of 8 bits of information transferred from the master to the slave (most significant bit first) plus a 1-bit acknowledgment from the slave to the master. The 8 bits transmitted by the master are done according to the bit write definition and the acknowledgment is read using the bit read definition. Byte Read: A byte read is an 8-bit information transfer from the slave to the master plus a 1-bit ACK or NACK from the master to the slave. The 8 bits of information that are transferred (most significant bit first) from the slave to the master are read by the master using the bit read definition, and the master transmits an ACK using the bit write definition to receive additional data bytes. The master must NACK the last byte read to terminate communication so the slave returns control of SDA to the master. Slave Address Byte: Each slave on the I2C bus responds to a slave address byte sent immediately following a START condition. The slave address byte contains the slave address in the most significant 7 bits and the R/W bit in the least significant bit. The device's slave address is D0h and cannot be modified by the user. When the R/W bit is 0 (such as in D0h), the master is indicating it writes data to the slave. If R/W = 1 (D1h in this case), the master is indicating it wants to read from the slave. If an incorrect slave address is written, the device assumes the master is communicating with another I2C device and ignore the communication until the next START condition is sent. Memory Address: During an I2C write operation, the master must transmit a memory address to identify the memory location where the slave is to store the data. The memory address is always the second byte transmitted during a write operation following the slave address byte. See Figure 9 for an I2C communication example.
DS3231M
I2C Communication
Writing a Single Byte to a Slave: The master must generate a START condition, write the slave address byte (R/W = 0), write the memory address, write the byte of data, and generate a STOP condition. Remember the master must read the slave's acknowledgment during all byte write operations. Writing Multiple Bytes to a Slave: To write multiple bytes to a slave, the master generates a START condition, writes the slave address byte (R/W = 0), writes the starting memory address, writes multiple data bytes, and generates a STOP condition. Reading a Single Byte from a Slave: Unlike the write operation that uses the specified memory address byte to define where the data is to be written, the read operation occurs at the present value of the memory address counter. To read a single byte from the slave, the master generates a START condition, writes the slave address byte with R/W = 1, reads the data byte with a NACK to indicate the end of the transfer, and generates a STOP condition. However, since requiring the master to keep track of the memory address counter is impractical, use the method for manipulating the address counter for reads. Manipulating the Address Counter for Reads: A dummy write cycle can be used to force the address counter to a particular value. To do this the master generates a START condition, writes the slave address byte (R/W = 0), writes the memory address where it desires to read, generates a repeated START condition, writes the slave address byte (R/W = 1),
17
5ppm, I2C Real-Time Clock DS3231M
TYPICAL I2C WRITE TRANSACTION MSB START 1 1 0 1 SLAVE ADDRESS 0 0 0 LSB R/W READ/ WRITE SLAVE ACK MSB b7 b6 b5 b4 b3 b2 b1 LSB b0 SLAVE ACK MSB b7 b6 b5 b4 b3 b2 b1 LSB b0 SLAVE ACK STOP
REGISTER ADDRESS
DATA
EXAMPLE I2C TRANSACTIONS D0h A) SINGLE BYTE WRITE -WRITE CONTROL REGISTER TO 44h B) SINGLE BYTE READ -READ CONTROL REGISTER START 11010000 D0h START 1 1 0 1 0 0 0 0 0Eh SLAVE 00001110 ACK 44h SLAVE 01000100 ACK SLAVE ACK D1h REPEATED START 02h SLAVE ACK 00000010 SLAVE ACK D1h SLAVE ACK REPEATED START 11010001 SLAVE ACK 11010001 SLAVE ACK 11h 00010001 SLAVE ACK DATA VALUE MASTER ACK STOP
STOP DATA VALUE MASTER NACK STOP
0Eh SLAVE SLAVE 00001110 ACK ACK 04h SLAVE ACK 00000100
D0h C) MULTIBYTE WRITE -WRITE DATE REGISTER TO "02" AND MONTH REGISTER TO "11" D) MULTIBYTE READ -READ ALARM 2 HOURS AND DATE VALUES START 1 1 0 1 0 0 0 0
D0h START 1 1 0 1 0 0 0 0 SLAVE ACK
0Ch 00001100
DATA VALUE MASTER NACK STOP
Figure 9. I2C Transactions
reads data with ACK or NACK as applicable, and generates a STOP condition. See Figure 6 for a read example using the repeated START condition to specify the starting memory location. Reading Multiple Bytes from a Slave: The read operation can be used to read multiple bytes with a single transfer. When reading bytes from the slave, the master simply ACKs the data byte if it desires to read another byte before terminating the transaction. After the master reads the last byte it must NACK to indicate the end of the transfer and then it generates a STOP condition.
If communications during battery operation are not required, the VBAT decoupling capacitor can be omitted. The 32KHZ and INT/SQW outputs are open drain and therefore require external pullup resistors to realize logichigh output levels. Pullup resistor values between 1kI and 10MI are typical. The RST output is also open drain, but is provided with an internal 50kI pullup resistor (RPU) to VCC. External pullup resistors should not be added. SDA is an open-drain output and requires an external pullup resistor to realize a logic-high level.
Using Open-Drain Outputs
SDA and SCL Pullup Resistors
Applications Information
To achieve the best results when using the DS3231M, decouple the VCC and/or VBAT power supplies with 0.1FF and/or 1.0FF capacitors. Use a high-quality, ceramic, surface-mount capacitor if possible. Surfacemount components minimize lead inductance, which improves performance, and ceramic capacitors tend to have adequate high-frequency response for decoupling applications.
Power-Supply Decoupling
Because the device does not use clock cycle stretching, a master using either an open-drain output with a pullup resistor or CMOS output driver (push-pull) could be used for SCL. The device contains Maxim's redundant battery-charge protection circuit to prevent any charging of the external battery.
Battery Charge Protection
18
5ppm, I2C Real-Time Clock
Package Information
For the latest package outline information and land patterns, go to www.maxim-ic.com/packages. Note that a "+", "#", or "-" in the package code indicates RoHS status only. Package drawings may show a different suffix character, but the drawing pertains to the package regardless of RoHS status. PACKAGE TYPE 16 SO 8 SO PACKAGE CODE W16+2 S8+4 OUTLINE NO. 21-0042 21-0041 LAND PATTERN NO. 90-0107 90-0096
DS3231M
19
5ppm, I2C Real-Time Clock DS3231M
Revision History
REVISION NUMBER 0 REVISION DATE 6/10 Initial release DESCRIPTION PAGES CHANGED --
Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time.
20
(c)
Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600 2010 Maxim Integrated Products Maxim is a registered trademark of Maxim Integrated Products, Inc.


▲Up To Search▲   

 
Price & Availability of DS3231M

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X